package com.web.startup;

import com.aop.DynamicChangeDataSourceAop;
import com.aop.RequestLimitAop;
import com.aop.TestLearnAop;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * Created with IntelliJ IDEA.
 * User: xf
 * Date: 2016/4/12
 * Time: 22:08
 * To change this template use Editor | File and Code Templates.
 */
@Configuration
@EnableAspectJAutoProxy
@ComponentScan(basePackages = {"com.aop"})
public class AopConfig {

    @Bean
    public TestLearnAop testLearnAop() {
        return new TestLearnAop();
    }

    @Bean
    public DynamicChangeDataSourceAop dynamicChangeDataSourceAop() {
        return new DynamicChangeDataSourceAop();
    }

    @Bean
    public RequestLimitAop requestLimitAop() {
        return new RequestLimitAop();
    }

}
